Skip to content

Add QUBO test data generation for problem-to-QUBO reductions#29

Open
GiggleLiu wants to merge 1 commit intomainfrom
issue-18-qubo-reductions
Open

Add QUBO test data generation for problem-to-QUBO reductions#29
GiggleLiu wants to merge 1 commit intomainfrom
issue-18-qubo-reductions

Conversation

@GiggleLiu
Copy link
Contributor

Summary

  • Add Python script (scripts/generate_qubo_tests.py) using qubogen to generate QUBO ground truth datasets for 7 problem types: MaxCut, VertexCovering, IndependentSet, Coloring, SetPacking, KSatisfiability (2-SAT), and ILP
  • Add make qubo-testdata target for reproducible regeneration
  • Test data lives in tests/data/qubo/ as compact JSON files with brute-force optimal solutions

This is the first step toward implementing problem-to-QUBO reductions (ref #18). The JSON datasets serve as ground truth for validating the Rust reduction implementations.

Test plan

  • make qubo-testdata runs successfully
  • make test passes (no regressions)
  • make clippy clean
  • JSON files contain valid QUBO matrices and optimal solutions

🤖 Generated with Claude Code

- Add scripts/generate_qubo_tests.py using qubogen to generate QUBO
  ground truth for 7 problem types: MaxCut, VertexCovering, IndependentSet,
  Coloring, SetPacking, KSatisfiability (2-SAT), and ILP
- Add scripts/ Python project managed by uv (pyproject.toml, uv.lock)
- Add tests/data/qubo/*.json with brute-force optimal solutions
- Add `make qubo-testdata` target to regenerate test data
- Update .gitignore for .venv/

Ref #18

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link

codecov bot commented Feb 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.21%. Comparing base (e27ef70) to head (514d4e9).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #29   +/-   ##
=======================================
  Coverage   97.21%   97.21%           
=======================================
  Files         160      160           
  Lines       25169    25169           
=======================================
  Hits        24469    24469           
  Misses        700      700           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant